# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=gnome-books
pkgver=40.0
pkgrel=1
pkgdesc="Access and organize your e-books on GNOME"
url="https://wiki.gnome.org/Apps/Books"
arch=(x86_64)
license=(GPL)
depends=(evince gjs gtk3 gnome-desktop tracker3-miners webkit2gtk libgepub
         gnome-epub-thumbnailer)
makedepends=(gobject-introspection git meson yelp-tools)
groups=(gnome-extra)
_commit=e5a6646a5586f36e0ee3167a77237b4c7eaff8e0  # tags/40.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-books.git#commit=$_commit"
        "git+https://gitlab.gnome.org/GNOME/libgd.git")
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname

  git submodule init
  git submodule set-url subprojects/libgd "$srcdir/libgd"
  git -c protocol.file.allow=always submodule update
}
  

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir="$pkgdir"
}

# vim:set sw=2 sts=-1 et:
